home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 409 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: Max TenEyck Woodbury <mtew@cds.duke.edu>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Are all Windows programs ill-formed?
  5. Date: 20 Feb 1996 10:50:59 PST
  6. Organization: Duke University Center for Demographic Studies
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <3128D340.2308@cds.duke.edu>
  9. References: <62PO12fJcDB@faerber.muc.de>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Mon, 19 Feb 1996 14:45:04 -0500
  12. X-Mailer: Mozilla 2.0 (Win16; I)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMSoYPUy4NqrwXLNJAQHlRQH+O9Qna652AnOp3L/yM8YiUUgT+JQBZI5l
  15.     BjnQzaZXuaVrk1yglRAfvd6lXOMmc1zdVbWBfFrSLwa48LhzdlIHqw==
  16.     =j88b
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. The requirement for a 'main' can NOT be built into the compiler because
  20. a program can be split into seperatly compilable source modules.  When
  21. compiling any given module there is no way of determining if it is the
  22. one and only module in the program that contains 'main'.  At best the
  23. requirement for a 'main' is a requirement on the linker.
  24.  
  25. Actually requiring a program to have a 'main' may be a problem.  What
  26. should probably be required is a capability to have a 'main' but allow
  27. other mechanisms that produce a comparable effect.  (No, I have no idea
  28. how to phrase that.)
  29.  
  30. There are other extensions to be considered.  A number of UNIX based
  31. systems allow an 'envp' as a third argument.  This seems to imply that
  32. 'main' is quite different from other C++ functions that overload on the
  33. number and type of its arguments.  In fact, it is much closer to a 'C'
  34. style function in its ability to handle a variable number of arguments.
  35.  
  36.         Max
  37. ---
  38. [ To submit articles: Try just posting with your newsreader.  If that fails,
  39.                       use mailto:std-c++@ncar.ucar.edu
  40.   FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  41.   Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  42.   Comments? mailto:std.c++-request@ncar.ucar.edu 
  43. ]
  44.